package com.shujia.wyh.day06.homework.test6;

public class Taxi extends Car {
    private String company;

    public Taxi() {
    }

    public Taxi(String carName, String carCard, String company) {
        super(carName, carCard);
        this.company = company;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    @Override
    public void start() {
        System.out.println("乘客，您好");
        System.out.println("我是" + company + "的，我的车牌是" + getCarCard() + "，您要去哪里？");
    }

    @Override
    public void stop() {
        System.out.println("目的地已经到了，请您付费下车，欢迎再次乘坐");
    }
}
